function deepClone(target) {
  if (typeof target === 'object' && target) {
    let cloneObj = {};
    for (const key in target) {
      const val = target[key];
      if (typeof val === 'object' && val) {
        cloneObj[key] = deepClone(val);
      } else {
        cloneObj[key] = val;
      }
    }
    return cloneObj;
  } else {
    return target;
  }
}

